import request from '@/utils/request'

export function login(username, password) {
  return request({
    url: '/account/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}

export function register(username, password, captcha) {
  return request({
    url: '/account/register',
    method: 'post',
    data: {
      username,
      password,
      captcha
    }
  })
}

export function getInfo() {
  return request({
    url: '/account/userinfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/account/logout',
    method: 'post'
  })
}

export function getTour(id) {
  return request({
    url: '/tour/get_tour_report/' + String(id),
    method: 'get'
  })
}

export function getTourList() {
  return request({
    url: '/tour/get_tour_list',
    method: 'get'
  })
}

export function getTourVideo(id) {
  return request({
    url: '/tour/get_tour_video/' + String(id),
    method: 'get'
  })
}

